package edu.thu.studio.ormdesigner.editor.command;

import edu.thu.studio.ormdesigner.common.AbstractCommand;
import edu.thu.studio.ormdesigner.model.diagram.link.Link;
import edu.thu.studio.ormdesigner.model.orm.table.Table;

public class UpdateReferencesCommand extends AbstractCommand {
    
    private Table table;
    private Link link;
    
    public UpdateReferencesCommand(Table element,Link link) {
        this.table = element;
        this.link = link;
    }
    
    @Override
    protected void doExecute() {
        this.link.refreshVisuals();
        this.table.refresh();
    }
    
    @Override
    protected void doUndo() {
        this.link.refreshVisuals();
        this.table.refresh();
    }
    
}
